import * as types from '@/store/action-types';

const initialState = {
    count: 1
}
export default function couterReducer(state = initialState, action) {
    switch(action.type) {
        case types.ADD:
            return {...state, count: state.count + 1};
        case types.MINUS: 
            return {...state, count: state.count - 1};
        default:
            return state;
    }

} 